#include <stdio.h>
#include <vector>
#include <iostream>
using namespace std;

//定义一个模板函数，用来打印容器的内容
  template<class Container>
void PrintContainer(const Container& con)
{
  class Container::const_iterator it = con.begin();
  while (it != con.end())
  {
    cout<<*it<<" ";
    ++it;
  }
  cout<<endl;
}

void test()
{
  vector<int> v1;
  v1.push_back(1);
  v1.push_back(2);
  v1.push_back(3);
  v1.push_back(4);
  v1.push_back(5);
  v1.push_back(6);
  cout<<v1.size()<<endl;
  cout<<v1.capacity()<<endl;
  PrintContainer(v1);
  v1.resize(10);
  PrintContainer(v1);
  cout<<v1.size()<<endl;
  cout<<v1.capacity()<<endl;
}

int main()
{
  test();
  return 0;
}
